/*******************************
 *	   Core Layout	(Use Taobao 960 grids)
 *	   http://kissy.googlecode.com/
 ********************************/

.body {
	margin:0 auto;
	overflow: hidden;
	_zoom: 1; /* hack for ie */
}

.page {
	margin:0 auto;
}

.main-wrap,.sidebar,.extra {
	float: left;
	overflow:hidden;
	*zoom: 1;
	:after {content: '\20';display: block;height: 0;clear: both;}
}

.main-wrap {
	width: 100%;
    min-height: 1px;
}

@cell : 40px;

@s3 : 3;
@s4 : 4;
@s5 : 5;
@s6 : 6;
@s7 : 7;
@s8 : 8;
@s9 : 9;
@s10 : 10;
@s12 : 12;
@s18 : 18;
@e3 : 3;
@e4 : 4;
@e5 : 5;
@e6 : 6;
@e7 : 7;
@e8 : 8;
@e10 : 10;
@e12 : 12;
@e13 : 13;

.grid-s3m0{
	.main {
		margin-left: @cell * @s3;
	}
	.sidebar {
		width: @cell * @s3 - 10;
		margin-left: -100%; 
	}
}

.grid-s4m0{
	.main {
		margin-left: @cell * @s4;
	}
	.sidebar {
		width: @cell * @s4 - 10;
		margin-left: -100%; 
	}
}


.grid-s5m0{
	.main {
		margin-left: @cell * @s5;
	}
	.sidebar {
		width: @cell * @s5 - 10;
		margin-left: -100%; 
	}
}

.grid-s6m0{
	.main {
		margin-left: @cell * @s6;
	}
	.sidebar {
		width: @cell * @s6 - 10;
		margin-left: -100%; 
	}
}

.grid-m0s4{
	.main {
		margin-right: @cell * @s4;
	}
	.sidebar {
		width: @cell * @s4 - 10;
		margin-left: 0 - @cell * @s4 + 10px;
	}
}

.grid-m0s5{
	.main {
		margin-right: @cell * @s5;
	}
	.sidebar {
		width: @cell * @s5 - 10;
		margin-left: 0 - @cell * @s5 + 10px;
	}
}

.grid-m0s6{
	.main {
		margin-right: @cell * @s6;
	}
	.sidebar {
		width: @cell * @s6 - 10;
		margin-left: 0 - @cell * @s6;
	}
}

.grid-m0s7{
	.main {
		margin-right: @cell * @s7;
	}
	.sidebar {
		width: @cell * @s7 - 10;
		margin-left: 0 - @cell * @s7;
	}
}


.grid-m0s8{
	.main {
		margin-right: @cell * @s8;
	}
	.sidebar {
		width: @cell * @s8 - 10;
		margin-left: 0 - @cell * @s8;
	}
}


.grid-s5m0e6{
	.main {
		margin-right:@cell*@e6;
		margin-left:@cell*@s5;
	}
	.sidebar {
		width: @cell * @s5 - 10;
		margin-left: -100%; 
	}
	.extra { 
		width: @cell * @e6 - 10;
		margin-left: 10 - @cell * @e6;
	}
}

.grid-e6m0s5{
	.main {
		margin-right:@cell * @s5;
		margin-left:@cell * @e6;
	}
	.sidebar {
		width: @cell * @s5 - 10;
		margin-left: 10 - @cell * @s5; 
	}
	.extra { 
		width: @cell * @e6 - 20;
		margin-left: -100%;
	}
}

.grid-e5m0s5{
	.main {
		margin-right:@cell * @s5 + 10;
		margin-left:@cell * @e5;
	}
	.sidebar {
		width: @cell * @s5 - 20;
		margin-left: 10 - @cell * @s5; 
	}
	.extra { 
		width: @cell * @e5 - 10;
		margin-left: -100%;
	}
}

.grid-s5m0e8{
	.main {
		margin-right:@cell*@e8;
		margin-left:@cell*@s5;
	}
	.sidebar {
		width: @cell * @s5 - 10;
		margin-left: -100%; 
	}
	.extra { 
		width: @cell * @e8 - 10;
		margin-left: 10 - @cell * @e8;
	}
}

.grid-s6m0e5{
	.main {
		margin-right:@cell*@e5;
		margin-left:@cell*@s6;
	}
	.sidebar {
		width: @cell * @s6 - 10;
		margin-left: -100%; 
	}
	.extra { 
		width: @cell * @e5 - 10;
		margin-left: 10 - @cell * @e5;
	}
}

.grid-s4m0e5{
	.main {
		margin-right:@cell*@e5;
		margin-left:@cell*@s4;
	}
	.sidebar {
		width: @cell * @s4 - 10;
		margin-left: -100%; 
	}
	.extra { 
		width: @cell * @e5 - 10;
		margin-left: 10 - @cell * @e5;
	}
}

.grid-e4m0s5{
	.main {
		margin-right:@cell * @s5 + 10;
		margin-left:@cell * @e4;
	}
	.sidebar {
		width: @cell * @s5 - 10;
		margin-left: 10 - @cell * @s5; 
	}
	.extra { 
		width: @cell * @e4 - 10;
		margin-left: -100%;
	}
}

.grid-e3m0s5{
	.main {
		margin-right:@cell * @s5 + 10;
		margin-left:@cell * @e3;
	}
	.sidebar {
		width: @cell * @s5 - 10;
		margin-left: 10 - @cell * @s5; 
	}
	.extra { 
		width: @cell * @e3 - 10;
		margin-left: -100%;
	}
}
